<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>增加影院-郫县电影</title>
<link rel="short icon"  href="/photo/head.png"/>
<style type="text/css">
	.left{    
		    width: 200px;
		    height: 750px;
		    float: left; 
		    background-color: #f4f3f4;
		    text-align: center;
		    border-right: 1px solid #d8d8d8;
	}
	.left h1 {
	    margin-top: 40px;
	    margin-bottom: 30px;
	    font-size: 22px;
	    color: #222;
	    font-weight: 400;
	}
	.right{
		position: absolute;
		left: 225px;
		top: 20px;
		border: 1px solid #d8d8d8;
	}
	body{
		border-top: 2px solid #d8d8d8;
		border-bottom: 2px solid #d8d8d8;
	}
	.left a {
	    display: block;
	    font-weight: 400;
	    color: #333;
	    height: 40px;
	    width: 202px;
	    margin-left: -1px;
	    line-height: 40px;
	    font-size: 18px;
	    text-decoration: none;
	}
	.left .active{
		color: #fff;
		background-color: #ed3931;
	}	
	.right>*{
		margin-left: 10px;
		margin-right: 10px;
	}
	table{
		border-spacing: 4px 10px;	
	}
	.right form {
	    padding: 0 0 20px 70px;
	    border-bottom: 2px solid #e1e1e1;
	}
	.right form>input {
	    margin-bottom: 10px;
	    left: 20px;
	    padding: 1px;
	    width: 240px;
	    height: 15px;
	}
	.right form>select{
		margin-bottom: 10px;
	    padding: 1px;
	    width: 246px;
	    height: 21px;
	}
	.right form>input[type=date]{
		width: 120px;
	}
	.right form>input.time{
		width: 30px;
		margin-right: 5px;
	}
	.right form>input[type=submit] {
	    cursor: pointer;
	    border-radius: 5px;
	    width: 100px;
	    height: 40px;
	    color: #fff;
	    font-size: 18px;
	    line-height: 40px;
	    border: none;
	    background-color: #ed3931;
	    padding: 0;
	    
	}
	.left .updateMovie{
		color: #9b9191;
	} 
</style>
</head>
<body>
	<div class="left">
		<h1>电影排片</h1>
		<a href="/cinemaFindAll">基本信息</a>
		<a href="/cinemaFindAllFilm">排片信息</a>
		<a href="/cinemadelete">删除排片</a>
		<a class="active">添加排片</a>
		<a class="updateMovie">修改排片</a>
			
	</div>
	<div class="right">
		<div style="height: 20px"></div>	
		<form action="/cinemainsert" method="post">
			电影开始时间:<input type="date" name="filmBeginTime"/>
						<input class="time" type="number" name="beginHour"/>时
						<input class="time" type="number" name="beginMin"/>分
						<br/>
			电影名称:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			<input type="text" name="movieId" value="${requestScope.filmName }" disabled="disabled"/><br/>
			<!--  影厅:<input type="text" name="hallName1"/><br/>-->
			影院:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			<input type="text" name="cinemaName1" value="${requestScope.cinemaName }" disabled="disabled"/><br/>
			
			
			影厅:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			<select name="hallName1">
				<c:forEach items="${requestScope.cinemaNames }" var="a">
					<option value="${a}" >${a}</option>
				</c:forEach>
			</select>
			</br>
			
			
			
			结束时间:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			<input type="date" name="filmEndTime"/>
					<input class="time" type="number" name="endHour"/>时
					<input class="time" type="number" name="endMin"/>分
					<br/>
			电影语言:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			<input type="text" name="filmLanguage"/><br/>
			电影版本:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			<input type="text" name="filmVersion"/><br/>		
			电影价格:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			<input type="number" name="price"/><br/>
			

			
			  <input type="hidden" name="movieId" value="${sessionScope.movieId }" />
			  <input type="hidden" name="cinemaName1" value="${requestScope.cinemaName }" /></br>
			 
			<input type="submit" value="提交"/>
			<c:choose>
				<c:when test="${requestScope.cuowu == 1 }">
					&nbsp;&nbsp;&nbsp;&nbsp;<span style="color:red">信息有误!</span>
				</c:when>
				<c:otherwise>
					<span></span>
				</c:otherwise>
			</c:choose>
		</form>
		<table>
			<thead>
				<tr>
					<th>电影开始时间</th>
					<th>电影名称</th>
					<th>影院</th>
					<th>影厅</th>
					<th>结束时间</th>
					<th>电影语言</th>
					<th>电影版本</th>
					<th>电影价格</th>
				</tr>
			</thead>
			<tbody>
				<c:forEach items="${requestScope.cinemas }" var="a">
					
					<tr>	
					
						<td>${a.filmBeginTimeString } &nbsp; ${a.beginHour }:${a.beginMin }</td>
						<td>${a.film.filmName }</td>
						<td>${a.cinemaName.cinemaName }</td>
						<td>${a.hall.hallName}</td>
						<td>${a.filmEndTimeString } &nbsp; ${a.endHour }:${a.endMin }</td>
						<td>${a.filmLanguage }</td>
						<td>${a.filmVersion }</td>
						<td>${a.price }</td>
						
					</tr>
					
					
				</c:forEach>
				
			</tbody>
		</table>
	</div>
</body>
</html>